Answer:

Enter age
? 23
adult rate
done

In detail what happens is:

  1. The program prints "Enter age".
  2. The user enters 23.
  3. The 23 is put in AGE.
  4. The condition of the IF is tested: AGE <= 16
  5. It is FALSE that 23 <= 16
  6. The false branch is executed: the program prints "adult rate".
  7. Execution continues with the statement after END IF: "done" is printed.

Relational Expressions

In the new version of the program, the test is different from the test in the first version of the program, so the true branch and false branch of the program had to be rearranged.

The tests in IF statements (and DO WHILE statements) need to be looked at in detail:

A relational expression compares two numbers and results in "true" or "false".

You have been using relational expressions in the condition part of IF and DO WHILE statements. A Relational Symbol says what comparison you want to make (sometimes relational symbols are called relational operators.) Here is the list of relational symbols, repeated from chapter 9:

Table of Relational Symbols
SymbolExampleMeaning
= A = B   is A equal to B ?
< A < B   is A less than B ?
<= A <= B   is A less than or equal to B ?
> A > B   is A Greater than B ?
>= A >= B   is A Greater than or equal to B ?
<> A <> B   is A different than B ?

QUESTION 11:

As a review, fill in the blanks in the following chart:

comparison true false
-7 = 17    
17 > -1    
17 <= -1    
2 < 4    
2 >= 2    
17 <> 17